<?php
    require("Utils.php");

    $post = getJsonParamter();

    $username = $post['username'];

    $sql = "SELECT amount FROM user WHERE username = ?";

    $conn = getConnection();

    $data = query($conn, $sql, $username);

    echo getJson(200, '获取余额成功', $data);
?>